#ifndef _OfcepDrawableCreator_H__
#define _OfcepDrawableCreator_H__


class DrawDataBase_EXPORT OfcepDrawableCreator : public OcRxCreator<DbDrawableType, OcPgDrawable>
 // ,public COfcepSingleton<OfcepDrawableCreator>
{
protected:
  OfcepDrawableCreator(void){};
  //friend class COfcepSingleton<OfcepDrawableCreator>;

public:
  typedef std::map<_DataPoolType, bool> ContextMembVisualMap;
public:
  virtual ~OfcepDrawableCreator(void){};
  DECLARE_Singleton(OfcepDrawableCreator);

public:
  OcPgDrawable * Create(_DataPoolType typePool, _DbDrawableType type, void* pData = NULL, bool blnChange = true);
  OcPgDrawable* getDrawable( _DataPoolType poolType );

public:
  bool setCurrent(_DataPoolType typePool, _DbDrawableType type); 
  const std::map<_DbDrawableType, OcPgDrawable*>* getDrawables(_DataPoolType typePool) /*const*/ ;
  virtual OcPgDrawable * getCurrentDrawable(_DataPoolType typePool) /*const*/;
 

protected:
  virtual OcPgDrawable * _Creat(DbDrawableType type, void* pData = NULL);
  virtual bool _setCurrent(DbDrawableType type);


private: 
  std::map<_DataPoolType, std::map<_DbDrawableType, OcPgDrawable*> > mmapDrawable;  
  std::map<_DataPoolType, std::pair<_DbDrawableType, OcPgDrawable*> > mmapCurrent;  


};



#define g_pDrawableCreator OfcepDrawableCreator::Instance()

#endif

